package com.wanghengzhi.girlfriend.rbac.module.account;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * @author 王潇
 * @since
 */
public interface AccountRepository extends PagingAndSortingRepository<AccountEntity, Integer>, JpaSpecificationExecutor<AccountEntity> {

    /**
     * 根据账号名称获取账号信息
     * @param account
     * @return
     */
    Optional<AccountEntity> getFirstByAccount(String account);

}
